package com.fa4j.code.mate.model;

import com.fa4j.common.base.model.AbstractCmd;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;


@Data
@Schema(description = "方法")
public class CodeMateMethodCreateCmd extends AbstractCmd {

    @NotNull
    @Schema(description = "上级ID")
    private Integer parentId;

    @NotBlank
    @Size(max = 64)
    @Pattern(regexp = CodeMateConstants.PATTERN_METHOD_NAME, message = "方法名称格式错误")
    @Schema(description = "方法名称")
    private String name;

    @Min(1)
    @Max(99)
    @Schema(description = "优先级")
    private Integer priority;

    @NotNull
    @Schema(description = "方法类型")
    private CodeMateMethodType type;

    @NotBlank
    @Size(max = 128)
    @Schema(description = "备注")
    private String remark;
}
